package com.lianxi.exacl.world;

import cn.hutool.core.lang.Console;
import com.lianxi.util.PoiUtil;
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
import org.apache.poi.xwpf.usermodel.*;
import org.junit.Test;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;

public class DemoWorld {


    @Test
    public void test1() throws FileNotFoundException {
//        FileInputStream fileInputStream = new FileInputStream(new File("D:\\Desktop\\素材\\world素材.docx"));
//
//        PoiUtil.docxToHtml(fileInputStream);


        PoiUtil.docxConvert(null, null, null);


    }


    @Test
    public void test2() throws IOException {
        FileInputStream fis = new FileInputStream(new File("D:\\Desktop\\素材\\world素材.docx"));
        XWPFDocument document = new XWPFDocument(fis);
        List<IBodyElement> bodyElements = document.getBodyElements();
        for (IBodyElement bodyElement : bodyElements) {
            System.out.println(bodyElement.getPart());
        }





    }
}
